<?php
namespace Home\Controller;


use Admin\Model\NewsModel;
use Admin\Model\ServerModel;
use Think\Controller;
class IndexController extends BaseController {
    public function index(){

        $newModel = new NewsModel();

        $new = $newModel->field('id,title,create_time,article_type')->where('article_class = 2')->order('create_time desc')->limit(4)->select();
        $this->assign("new", $new);

        $serModel = new ServerModel();
        $ser = $serModel->field('id,title,home_img')->order('id desc')->limit(8)->select();
        $this->assign('ser',$ser);

        $this->assign("menu", "index");
        $this->display();
    }
}